package com.example.factorymethod;

import com.example.factorymethod.factory.Fruit;
import com.example.factorymethod.factory.FruitFactory;

/**
 * @version 1.0.0
 * @className: OrangeFruitFactory
 * @description:
 * @author: zhangjunfa
 * @date: 2022/6/10 14:17
 */
public class OrangeFruitFactory implements FruitFactory {
    /**
     * 抽象工厂方法
     *
     * @return
     */
    @Override
    public Fruit createFruit() {
        //桔子树长出了一个桔子
        Fruit orange = new OrangeFruit();
        System.out.println("桔子树长出了一个桔子");
        return orange;

    }
}
